export default {
    [`GET /api/dictionary/node`](req, res) {
        res.status(200).json({
            code: 200,
            data: {
                name: '字典名'
            }
        })
    },

    [`GET /api/dictionary/node/search`](req, res) {
        res.status(200).json({
            code: 200,
            data: [{
                id: 12,
                path: '1/12',
                name: '字典名/测试分类名字'
            }]
        })
    },

    [`GET /api/dictionary/attr`](req, res) {
        res.status(200).json({
            code: 200,
            data: {
                name: 'test',
                value: 1
            }
        })
    },

    [`GET /api/dictionary/nodes`](req, res) {
        if (req.query.id == '1') {
            res.status(200).json({
                code: 200,
                data: [{
                    id: 11,
                    name: '字典分类名',
                    value: 1,
                }, {
                    id: 12,
                    name: '测试分类名字',
                    value: 2,
                    isLeaf: true
                }]
            })
        } else if (req.query.id == '11') {
            res.status(200).json({
                code: 200,
                data: [{
                    id: 111,
                    name: '子字典名',
                    value: 1,
                    isLeaf: true
                }, {
                    id: 112,
                    name: '子测试名字',
                    value: 2,
                    isLeaf: true
                }]
            })
        } else if (req.query.id == '12') {
            res.status(200).json({
                code: 200,
                data: [{
                    id: 121,
                    name: '第二字典名',
                    value: 1,
                    isLeaf: true
                }, {
                    id: 122,
                    name: '第二测试名字',
                    value: 2,
                    isLeaf: true
                }]
            })
        } else {
            res.status(200).json({
                code: 200,
                data: [{
                    id: 1,
                    name: '字典名',
                    value: 1,
                }, {
                    id: 2,
                    name: '测试名字',
                    value: 2,
                    isLeaf: true
                }]
            })
        }
    },

    [`POST /api/dictionary/attr/list`](req, res) {
        res.status(200).json({
            code: 200,
            data: {
                total: 300,
                data: [{
                    id: 1,
                    name: 'test',
                    type: 1,
                    title: '字典名称一'
                }, {
                    id: 2,
                    name: 'city',
                    type: 2,
                    title: '省市区'
                }]
            }
        })
    },
}